<?php
/*
 * Copyright (c) 2021.  Liuhongbin All rights reserved.
 * @domain http://dkyx.cc
 * @author liuhongbin <514660094@qq.com>
 */

namespace hiduoke\services\formBuilder\element;

use FormBuilder\Driver\CustomComponent;

class ElTabPane extends CustomComponent
{

    public function createValidate()
    {
    }


    /**
     * 选项卡标题
     * @param string $label
     * @return ElTabPane
     */
    public function label($label)
    {
        return $this->props(['label' => $label]);
    }

    /**
     * 与选项卡绑定值 value 对应的标识符，表示选项卡别名
     * @param string $name
     * @return ElTabPane
     */
    public function name($name)
    {
        return $this->props(['name' => $name]);
    }

    /**
     * 是否禁用
     * @param bool $disabled
     * @return ElTabPane
     */
    public function disabled($disabled = true)
    {
        return $this->props(['disabled' => $disabled]);
    }
}
